<p>Swift has shorthand operators that combine one operator with an assignment, so you can change a variable in place. These look like the existing operators you know – <code>+</code>, <code>-</code>, <code>*</code>, and <code>/</code>, but they have an <code>=</code> on the end because they assign the result back to whatever variable you were using.</p>
<p>For example, if someone scored 95 in an exam but needs to be penalized 5 points, you could write this:</p>
<pre class="code">
<p></p>
<p><span class="keyword">var</span> score <span class="operator">=</span> <span class="number">95</span></p>
<p>score <span class="operator">-</span><span class="operator">=</span> <span class="number">5</span></p>
<p></p>
</pre>

<p style="height: 0px; margin-bottom: 0px;"></p>
<p>Similarly, you can add one string to another using <code>+=</code>:</p>
<pre class="code">
<p></p>
<p><span class="keyword">var</span> quote <span class="operator">=</span> <span class="string">"The rain in Spain falls mainly on the "</span></p>
<p>quote <span class="operator">+</span><span class="operator">=</span> <span class="string">"Spaniards"</span></p>
<p></p>
</pre>

<p style="height: 0px; margin-bottom: 0px;"></p>